/*
 * @Author: zwc 6537397+uni-yunApp@user.noreply.gitee.com
 * @Date: 2021-02-22 18:19:38
 * @LastEditors: zwc 6537397+uni-yunApp@user.noreply.gitee.com
 * @LastEditTime: 2023-04-13 18:28:47
 * @FilePath: \ant-design-vue-admin-master\src\store\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Vue from 'vue'
import Vuex from 'vuex'
import createLogger from 'vuex/dist/logger'
import state from './state'
import * as getters from './getters'
import * as actions from './actions'
import mutations from './mutations'
import user from './modules/user'
import permission from './modules/permission'

Vue.use(Vuex)

// 调试工具，开发环境使用，线上关闭
const debug = process.env.NODE_ENV !== 'production'

const store = new Vuex.Store({
  modules: {
    user,
    permission
  },
  state,
  mutations,
  getters,
  actions,
  plugins: debug ? [createLogger()] : []
})

export default store
